package com.sany.hibernate.dao;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class HibernateGetBean {
	
	public static HibernateDaoSupport getHibernateBean(String beanName){
		ApplicationContext context = new ClassPathXmlApplicationContext("com/sany/spring/applicationContext.xml");
		return (HibernateDaoSupport)context.getBean(beanName);
	}
}
